From: Benjamin Otte Date: Sat, 14 Jan 2012 03:39:07 +0000 (+0100) Subject: css: Initialize values to their specified type X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~18212 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f7e0ce3b28ec5d98dd7d4d08bf3c623f5ed09c54;p=gtk%2B3.0.git css: Initialize values to their specified type .. when parsing. --- diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c index 94680389ac..9743b8821b 100644 --- a/gtk/gtkcssstyleproperty.c +++ b/gtk/gtkcssstyleproperty.c @@ -201,7 +201,7 @@ gtk_css_style_property_parse_value (GtkStyleProperty *property, return TRUE; } - g_value_init (value, _gtk_style_property_get_value_type (property)); + g_value_init (value, _gtk_css_style_property_get_specified_type (style_property)); if (!(* style_property->parse_value) (style_property, value, parser, base)) { g_value_unset (value); diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c index a6b65fe1d0..d41048f328 100644 --- a/gtk/gtkcssstylepropertyimpl.c +++ b/gtk/gtkcssstylepropertyimpl.c @@ -418,8 +418,6 @@ css_image_value_parse (GtkCssStyleProperty *property, return FALSE; } - g_value_unset (value); - g_value_init (value, GTK_TYPE_CSS_IMAGE); g_value_take_object (value, image); return TRUE; }